package server;

import java.util.ArrayList;

public class OtherHelper {

	/**
	 * @param args
	 */
	public boolean checkPassword(String userStatus,String  userNum,String  userInputPassword) {
		IOhelper iOhelper = new IOhelper();
		ArrayList<String> userInfor = iOhelper.getCertainList("files/"+userStatus+"/.txt", userNum, 1);
		if(userInfor.get(0).split(" ")[1].equals(String.valueOf(userInputPassword.hashCode()))) {
		return true;
		}else {
			return false;
		}
	}
	public String transPassword(String  rawPassword) {
		int hash = rawPassword.hashCode();
		String newPassword = String.valueOf(hash);
		return newPassword;
	}
	
}
